
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>轩盛金融</title>
    <meta name="keywords" content="轩盛金融">
    <meta name="description" content="轩盛金融">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="__CSS__/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="__CSS__/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="__CSS__/animate.min.css" rel="stylesheet">
    <link href="__CSS__/style.min862f.css?v=4.1.0" rel="stylesheet">
    <link href="__JS__/layui/css/layui.css"rel="stylesheet">

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>新增活动</small></h5>
                        <div class="ibox-tools">
                            <a class="collapse-link" href="{:url('Am/activityList')}">
                                <i class="fa fa-reply"></i>
                            </a>

                        </div>
                    </div>
                    <div class="ibox-content">
                        <form method="post" action="{:url('Am/addActivity')}" class="form-horizontal layui-form" enctype="multipart/form-data">
                            <div class="form-group">
                                <label for="title" class="col-sm-3 control-label">活动名称</label>

                                <div class="col-sm-6">
                                    <input type="text" lay-verify="required" id="title" name="title" class="form-control layui-input">
                                </div>
                            </div>


                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="thumbnail" class="col-sm-3 control-label">活动封面图片</label>

                                <div class="col-sm-6">
                                    <input type="file" lay-verify="required" id="thumbnail" name="thumbnail" class="form-control" accept="image/*">
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label for="description" class="col-sm-3 control-label">活动简介</label>

                                <div class="col-sm-6">
                                    <textarea name="description" lay-verify="required" style="resize:none" class="form-control" rows="8"></textarea>
                                </div>
                            </div>
                    
                            
                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="start_time">活动开始时间</label>

                                <div class="col-sm-6">
                                    <input type="type" id="start_time" lay-verify="required" name="start_time" class="form-control" >
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="end_time">活动结束时间</label>

                                <div class="col-sm-6">
                                    <input type="type" id="end_time" lay-verify="required" name="end_time" class="form-control" >
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="sold_out">是否开启活动</label>
                                
                                <div class="col-sm-6">
                                    <div class="">
                                        <div class="layui-input-block" style="margin-left:0">
                                          <input type="radio" name="sold_out" value="1" title="是" checked>
                                          <input type="radio" name="sold_out" value="2" title="否" >
                                        </div>
                                    </div>
                                </div>
                            </div>

                            

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label" for="container">活动详情</label>

                                <div class="col-sm-6">
                                    <script id="container" name="content" type="text/plain"></script>
                                </div>
                            </div>

                            <input type="hidden" name="cat_id" value="5">
                            <input type="hidden" name="cat_name" value="活动">

                            <div class="hr-line-dashed"></div>
                            <div class="form-group">
                                <div class="col-sm-2 col-sm-offset-7">
                                    <button lay-submit lay-filter="upload" class="btn btn-primary btn-block" type="submit">保存内容</button>
                                    
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script src="__JS__/jquery.min.js?v=2.1.4"></script>
    <script src="__JS__/bootstrap.min.js?v=3.3.6"></script>
    <script src="__JS__/plugins/ueditor/ueditor.config.js"></script>
    <script src="__JS__/plugins/ueditor/ueditor.all.js"></script>
    <script src="__JS__/layui/layui.js"></script>
    <script>
        // 富文本设置
        var editor = UE.getEditor('container',{
            toolbars: [[
            'fullscreen', 'source', '|', 'undo', 'redo', '|',
            'bold', 'italic', 'underline', 'fontborder', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', '|',
            'rowspacingtop', 'rowspacingbottom', 'lineheight', '|',
            'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
            'directionalityltr', 'directionalityrtl', 'indent', '|',
            'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|', 'touppercase', 'tolowercase', '|',
            'link', 'unlink', 'anchor', '|', 'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
            'simpleupload', 'emotion', 'scrawl','insertframe', 'insertcode', 'webapp', 'pagebreak', 'template', 'background', '|',
            'horizontal', 'date', 'time', 'spechars', 'snapscreen', 'wordimage', '|',
            'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols', 'charts', '|',
            'print', 'preview', 'searchreplace', 'drafts', 'help'
        ]],
        autoHeightEnabled:true,
        initialFrameHeight:400
        });

        // 引用layui
        layui.use(['layer', 'form','laydate'], function(){
          var layer = layui.layer;
          var form = layui.form;
          var laydate = layui.laydate;

          laydate.render({
            elem: '#start_time',
            type: 'datetime',
            theme: 'molv',
            min: 0,
            format: 'yyyy-MM-dd HH:mm:ss'
          });

          laydate.render({
            elem: '#end_time',
            type: 'datetime',
            theme: 'molv',
            min: 0,
            format: 'yyyy-MM-dd HH:mm:ss'
          });

        });
    </script>
</body>

</html>
